/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Derek
 */
import java.io.*;

public class CSSGenerator {
    // fontface, fontfamily, same thing.. it's just that MS has different names for everything
    // can be put into the properties file
  
    static String ngroupTitleColorHex="#336699";
    static String ngroupTitleFontFace="Trebuchet MS"; // more HTML font face available at the bottom
    static String ngroupTitleFontWeight="bold";
    
    static String ngroupTextColorHex="#000000";
    
    static String ngroupMessageLabelColorHex="#336699";
    static String ngroupMessageLabelFontFace="COURIER";
    static String ngroupMessageLabelFontSize="9";
    
    static String copyRightColorHex="#7A7A7A";
    static String copyRightFontFace="COURIER";
    static String copyRightFontSize="3pt";
    static String copyRightFontDeco="normal";
    
    static String ngroupSectionLinkColor="#3B5998";
    static String ngroupSectionLinkFontSize="9";
    static String ngroupSectionLinkFontFamily="COURIER";
    static String ngroupSectionLinkTextDeco="none";
    
    static String ngroupOuterTableBorderWidth="0";
    static String ngroupOuterTableBorderColor="#336699";
    
     
    static String ngroupPostingInfoColorHex="#336699";
    static String ngroupPostingInfoFontFace="Arial";
    static String ngroupPostingInfoFontSize="8pt";
    static String ngroupPostingInfoFontStyle="italic";
    
    static public void generateNewsGroupPopupReplayInlineCSS(PrintWriter out)
     {
         out.println(
                   " <style type=\"text/css\"> \n" +
                   " P {" +
                   "        color:" + ngroupTextColorHex +
                   "      }" +
                   " P.ngroupMessageLabel {" +
                   "        color:" + ngroupMessageLabelColorHex +";" +
                   "        font-family:" + ngroupMessageLabelFontFace +";" +
                   "        font-size:" + ngroupMessageLabelFontSize +
                   "  }" +
                   " P.copyRight {" +
                   "       color:" + copyRightColorHex + ";" +
                   "       font-size:" + copyRightFontSize + ";" +
                   "       font-family:" + copyRightFontFace + ";" +
                   "       font-style:" + copyRightFontDeco + 
                   " }" +
                   " P.postInfo {" +
                   "       color:" + ngroupPostingInfoColorHex + ";" +
                   "       font-size:" + ngroupPostingInfoFontSize + ";" +
                   "       font-family:" + ngroupPostingInfoFontFace + ";" +
                   "       font-style:" + ngroupPostingInfoFontStyle + 
                   " }" +                   
                   "A:link {text-decoration: none}" +
"A:visited {text-decoration: none}" +
"A:active {text-decoration: none}" +
"A:hover {text-decoration: underline; color: red;}" +
                   " a: focus {color: #FFFFFF}"+
                   " </style> " 
                    );
            
            
     }
    
     
     static public void generateNewsGroupMainPageInlineCSS(PrintWriter out)
     {
         out.println(
                   " <style type=\"text/css\"> \n" +
                   " TD { "+
                   "         border-color: " + ngroupOuterTableBorderColor + ";" +
                   "         border-width: " + ngroupOuterTableBorderWidth + 
                   "     }" +
                   " P {" +
                   "        color:" + ngroupTextColorHex +
                   "      }" +
                   " P.ngroupTitle {" +
                   "        color:" + ngroupTitleColorHex +";" +
                   "        font-family:" + ngroupTitleFontFace +";" +
                   "        font-weight:" + ngroupTitleFontWeight +
                   "  }" +
                   " P.ngroupSectionLinkText {" +
                   "       color:" + ngroupSectionLinkColor + ";" +
                   "       font-size:" + ngroupSectionLinkFontSize + ";" +
                   "       font-family:" + ngroupSectionLinkFontFamily + ";" +
                   "       text-decoration:" + ngroupSectionLinkTextDeco + 
                   " }" +
                   " a{" +
                   "        color:" + ngroupSectionLinkColor +
                   "  }" +
                   "A:link {text-decoration: none}" +
                   "A:visited {text-decoration: none}" +
                   "A:active {text-decoration: none}" +
                   "A:hover {text-decoration: underline}" +
                   "a: focus {color: #FFFFFF}"+
                   " </style> " 
                    );
     }
     
     static public void generateSearchServletInlineCSS(PrintWriter out)
     {
         out.println(
                   " <style type=\"text/css\"> \n" +
                   " TD { "+
                   "         border-color: " + ngroupOuterTableBorderColor + ";" +
                   "         border-width: " + ngroupOuterTableBorderWidth + 
                   "     }" +
                   " P {" +
                   "        color:" + ngroupTextColorHex +
                   "      }" +
                   " P.searchLabels {" +
                   "        color:" + ngroupTitleColorHex +";" +
                   "        font-family:" + ngroupTitleFontFace +";" +
                   "        font-weight:" + ngroupTitleFontWeight +
                   "  }" +
                   " P.ngroupSectionLinkText {" +
                   "       color:" + ngroupSectionLinkColor + ";" +
                   "       font-size:" + ngroupSectionLinkFontSize + ";" +
                   "       font-family:" + ngroupSectionLinkFontFamily + ";" +
                   "       text-decoration:" + ngroupSectionLinkTextDeco + 
                   " }" +
                   " a{" +
                   "        color:" + ngroupSectionLinkColor +
                   "  }" +
                   " P.copyRight {" +
                   "       color:" + copyRightColorHex + ";" +
                   "       font-size:" + copyRightFontSize + ";" +
                   "       font-family:" + copyRightFontFace + ";" +
                   "       font-style:" + copyRightFontDeco + 
                   " }" +
                   "A:link {text-decoration: none}" +
                   "A:visited {text-decoration: none}" +
                   "A:active {text-decoration: none}" +
                   "A:hover {text-decoration: underline}" +
                   "a: focus {color: #FFFFFF}"+
                   " </style> " 
                    );
     }
}
